package com.poizon.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.poizon.dao.MomentTypeDao;
import com.poizon.entity.MomentType;
import com.poizon.service.intf.MomentTypeService;
import com.poizon.vo.R;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName MomentTypeServiceImpl
 * @Author NoCheng
 * @Date 2022/1/6 18:13
 * @Description:TODO 动态类型业务接口层
 */
@Service
public class MomentTypeServiceImpl implements MomentTypeService {
    private final MomentTypeDao dao;

    public MomentTypeServiceImpl(MomentTypeDao dao) {
        this.dao = dao;
    }

    @Override
    public R queryAll() {
        List<MomentType> types = dao.selectList(new QueryWrapper<>());
        return R.ok(types);
    }
}
